





<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" >
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>tvm.relay.vision &mdash; tvm 0.8.dev1982 文档</title>
  

  
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/gallery.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/css/tlcpack_theme.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../../../_static/tvm-logo-square.png"/>
  

  
  
  
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
        <script data-url_root="../../../../" id="documentation_options" src="../../../../_static/documentation_options.js"></script>
        <script src="../../../../_static/jquery.js"></script>
        <script src="../../../../_static/underscore.js"></script>
        <script src="../../../../_static/doctools.js"></script>
        <script src="../../../../_static/translations.js"></script>
    
    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>

    
    <script type="text/javascript" src="../../../../_static/js/tlcpack_theme.js"></script>
    <link rel="index" title="索引" href="../../../../genindex.html" />
    <link rel="search" title="搜索" href="../../../../search.html" />
    <link rel="next" title="tvm.relay.image" href="image.html" />
    <link rel="prev" title="tvm.relay.nn" href="nn.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    
<header class="header">
    <div class="innercontainer">
      <div class="headerInner d-flex justify-content-between align-items-center">
          <div class="headerLogo">
               <a href="https://tvm.apache.org/"><img src=https://tvm.apache.org/assets/images/logo.svg alt="logo"></a>
          </div>

          <div id="headMenu" class="headerNav">
            <button type="button" id="closeHeadMenu" class="navCloseBtn"><img src="../../../../_static/img/close-icon.svg" alt="Close"></button>
             <ul class="nav">
                <li class="nav-item">
                   <a class="nav-link" href=https://tvm.apache.org/community>Community</a>
                </li>
                <li class="nav-item">
                   <a class="nav-link" href=https://tvm.apache.org/download>Download</a>
                </li>
                <li class="nav-item">
                   <a class="nav-link" href=https://tvm.apache.org/vta>VTA</a>
                </li>
                <li class="nav-item">
                   <a class="nav-link" href=https://tvm.apache.org/blog>Blog</a>
                </li>
                <li class="nav-item">
                   <a class="nav-link" href=https://tvm.apache.org/docs>Docs</a>
                </li>
                <li class="nav-item">
                   <a class="nav-link" href=https://tvmconf.org>Conference</a>
                </li>
                <li class="nav-item">
                   <a class="nav-link" href=https://github.com/apache/tvm/>Github</a>
                </li>
                <li class="nav-item">
                   <a class="nav-link" href=https://tvmchinese.github.io/declaration_zh_CN.html>About-Translators</a>
                </li>
             </ul>
               <div class="responsivetlcdropdown">
                 <button type="button" class="btn-link">
                   ASF
                 </button>
                 <ul>
                     <li>
                       <a href=https://apache.org/>Apache Homepage</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/licenses/>License</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/foundation/sponsorship.html>Sponsorship</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/security/>Security</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/foundation/thanks.html>Thanks</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/events/current-event>Events</a>
                     </li>
                     <li>
                       <a href=https://www.zhihu.com/column/c_1429578595417563136>Zhihu</a>
                     </li>
                 </ul>
               </div>
          </div>
            <div class="responsiveMenuIcon">
              <button type="button" id="menuBtn" class="btn-menu"><img src="../../../../_static/img/menu-icon.svg" alt="Menu Icon"></button>
            </div>

            <div class="tlcDropdown">
              <div class="dropdown">
                <button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  ASF
                </button>
                <div class="dropdown-menu dropdown-menu-right">
                  <ul>
                     <li>
                       <a href=https://apache.org/>Apache Homepage</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/licenses/>License</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/foundation/sponsorship.html>Sponsorship</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/security/>Security</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/foundation/thanks.html>Thanks</a>
                     </li>
                     <li>
                       <a href=https://www.apache.org/events/current-event>Events</a>
                     </li>
                     <li>
                       <a href=https://www.zhihu.com/column/c_1429578595417563136>Zhihu</a>
                     </li>
                  </ul>
                </div>
              </div>
          </div>
       </div>
    </div>
 </header>
 
    <nav data-toggle="wy-nav-shift" class="wy-nav-side fixed">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../../../index.html">
          

          
            
            <img src="../../../../_static/tvm-logo-small.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
                <div class="version">
                  0.8.dev1982
                </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption" role="heading"><span class="caption-text">如何开始</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../install/index.html">安装 TVM</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../contribute/index.html">贡献者指南</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">用户引导</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../tutorial/index.html">User Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../how_to/index.html">How To Guides</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">开发者引导</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../dev/tutorial/index.html">Developer Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../dev/how_to/how_to.html">开发者指南</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">架构指南</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../arch/index.html">Design and Architecture</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">主题引导</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../topic/microtvm/index.html">microTVM：裸机使用TVM</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../topic/vta/index.html">VTA: Versatile Tensor Accelerator</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">参考指南</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../langref/index.html">语言参考</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Python API</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../runtime.html">tvm.runtime</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ndarray.html">tvm.runtime.ndarray</a></li>
<li class="toctree-l2"><a class="reference internal" href="../error.html">tvm.error</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ir.html">tvm.ir</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ir.html#module-tvm.instrument">tvm.instrument</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ir.html#module-tvm.transform">tvm.transform</a></li>
<li class="toctree-l2"><a class="reference internal" href="../target.html">tvm.target</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tir.html">tvm.tir</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tir.html#module-tvm.tir.transform">tvm.tir.transform</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tir.html#tvm-tir-analysis">tvm.tir.analysis</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tir.html#module-tvm.tir.stmt_functor">tvm.tir.stmt_functor</a></li>
<li class="toctree-l2"><a class="reference internal" href="../te.html">tvm.te</a></li>
<li class="toctree-l2"><a class="reference internal" href="../te.html#module-tvm.te.hybrid">tvm.te.hybrid</a></li>
<li class="toctree-l2"><a class="reference internal" href="../driver.html">tvm.driver</a></li>
<li class="toctree-l2"><a class="reference internal" href="index.html">tvm.relay</a></li>
<li class="toctree-l2"><a class="reference internal" href="frontend.html">tvm.relay.frontend</a></li>
<li class="toctree-l2"><a class="reference internal" href="nn.html">tvm.relay.nn</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">tvm.relay.vision</a></li>
<li class="toctree-l2"><a class="reference internal" href="image.html">tvm.relay.image</a></li>
<li class="toctree-l2"><a class="reference internal" href="transform.html">tvm.relay.transform</a></li>
<li class="toctree-l2"><a class="reference internal" href="analysis.html">tvm.relay.analysis</a></li>
<li class="toctree-l2"><a class="reference internal" href="backend.html">tvm.relay.backend</a></li>
<li class="toctree-l2"><a class="reference internal" href="dataflow_pattern.html">tvm.relay.dataflow_pattern</a></li>
<li class="toctree-l2"><a class="reference internal" href="testing.html">tvm.relay.testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="../autotvm.html">tvm.autotvm</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_scheduler.html">tvm.auto_scheduler</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rpc.html">tvm.rpc</a></li>
<li class="toctree-l2"><a class="reference internal" href="../micro.html">tvm.micro</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contrib.html">tvm.contrib</a></li>
<li class="toctree-l2"><a class="reference internal" href="../graph_executor.html">tvm.contrib.graph_executor</a></li>
<li class="toctree-l2"><a class="reference internal" href="../topi.html">tvm.topi</a></li>
<li class="toctree-l2"><a class="reference internal" href="../vta/index.html">vta</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../links.html">Other APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../publications.html">Publications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../genindex.html">索引</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
      
      <nav class="wy-nav-top" aria-label="top navigation" data-toggle="wy-nav-top">
        
            <div class="togglemenu">

            </div>
            <div class="nav-content">
              <!-- tvm -->
              Table of content
            </div>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        

          




















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../../index.html">Docs</a> <span class="br-arrow">></span></li>
        
          <li><a href="../index.html">Python API</a> <span class="br-arrow">></span></li>
        
      <li>tvm.relay.vision</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="../../../../_sources/reference/api/python/relay/vision.rst.txt" rel="nofollow"> <img src="../../../../_static//img/source.svg" alt="viewsource"/></a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="module-tvm.relay.vision">
<span id="tvm-relay-vision"></span><h1>tvm.relay.vision<a class="headerlink" href="#module-tvm.relay.vision" title="永久链接至标题">¶</a></h1>
<p>Vision network related operators.</p>
<p><strong>函数：</strong></p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#tvm.relay.vision.all_class_non_max_suppression" title="tvm.relay.vision.all_class_non_max_suppression"><code class="xref py py-obj docutils literal notranslate"><span class="pre">all_class_non_max_suppression</span></code></a>(boxes, scores)</p></td>
<td><p>Non-maximum suppression operator for object detection, corresponding to ONNX NonMaxSuppression and TensorFlow combined_non_max_suppression.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#tvm.relay.vision.get_valid_counts" title="tvm.relay.vision.get_valid_counts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_valid_counts</span></code></a>(data, score_threshold[, …])</p></td>
<td><p>Get valid count of bounding boxes given a score threshold.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#tvm.relay.vision.multibox_prior" title="tvm.relay.vision.multibox_prior"><code class="xref py py-obj docutils literal notranslate"><span class="pre">multibox_prior</span></code></a>(data[, sizes, ratios, steps, …])</p></td>
<td><p>在 data 中，根据 sizes 和 ratios 生成先验框（锚框）。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#tvm.relay.vision.multibox_transform_loc" title="tvm.relay.vision.multibox_transform_loc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">multibox_transform_loc</span></code></a>(cls_prob, loc_pred, …)</p></td>
<td><p>Location transformation for multibox detection</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#tvm.relay.vision.non_max_suppression" title="tvm.relay.vision.non_max_suppression"><code class="xref py py-obj docutils literal notranslate"><span class="pre">non_max_suppression</span></code></a>(data, valid_count, indices)</p></td>
<td><p>Non-maximum suppression operator for object detection.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#tvm.relay.vision.proposal" title="tvm.relay.vision.proposal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">proposal</span></code></a>(cls_prob, bbox_pred, im_info, …)</p></td>
<td><p>Proposal operator.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#tvm.relay.vision.roi_align" title="tvm.relay.vision.roi_align"><code class="xref py py-obj docutils literal notranslate"><span class="pre">roi_align</span></code></a>(data, rois, pooled_size, spatial_scale)</p></td>
<td><p>ROI align operator.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#tvm.relay.vision.roi_pool" title="tvm.relay.vision.roi_pool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">roi_pool</span></code></a>(data, rois, pooled_size, spatial_scale)</p></td>
<td><p>ROI pool operator.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#tvm.relay.vision.yolo_reorg" title="tvm.relay.vision.yolo_reorg"><code class="xref py py-obj docutils literal notranslate"><span class="pre">yolo_reorg</span></code></a>(data, stride)</p></td>
<td><p>Yolo reorg operation used in darknet models.</p></td>
</tr>
</tbody>
</table>
<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.all_class_non_max_suppression">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">all_class_non_max_suppression</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">boxes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scores</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_output_boxes_per_class</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">iou_threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">score_threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output_format</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'onnx'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.all_class_non_max_suppression" title="永久链接至目标">¶</a></dt>
<dd><p>Non-maximum suppression operator for object detection, corresponding to ONNX
NonMaxSuppression and TensorFlow combined_non_max_suppression.
NMS is performed for each class separately.</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>boxes</strong> (<em>relay.Expr</em>) – 3-D tensor with shape (batch_size, num_boxes, 4)</p></li>
<li><p><strong>scores</strong> (<em>relay.Expr</em>) – 3-D tensor with shape (batch_size, num_classes, num_boxes)</p></li>
<li><p><strong>max_output_boxes_per_class</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a><em> or </em><em>relay.Expr</em><em>, </em><em>optional</em>) – The maxinum number of output selected boxes per class</p></li>
<li><p><strong>iou_threshold</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.10)"><em>float</em></a><em> or </em><em>relay.Expr</em><em>, </em><em>optionaIl</em>) – IoU test threshold</p></li>
<li><p><strong>score_threshold</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.10)"><em>float</em></a><em> or </em><em>relay.Expr</em><em>, </em><em>optional</em>) – Score threshold to filter out low score boxes early</p></li>
<li><p><strong>output_format</strong> (<em>string</em><em>, </em><em>optional</em>) – “onnx” or “tensorflow”. Specify by which frontends the outputs are
intented to be consumed.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><p><strong>out</strong> – If <cite>output_format</cite> is “onnx”, the output is a relay.Tuple of two tensors, the first is
<cite>indices</cite> of size <cite>(batch_size * num_class* num_boxes , 3)</cite> and the second is a scalar
tensor <cite>num_total_detection</cite> of shape <cite>(1,)</cite> representing the total number of selected
boxes. The three values in <cite>indices</cite> encode batch, class, and box indices.
Rows of <cite>indices</cite> are ordered such that selected boxes from batch 0, class 0 come first,
in descending of scores, followed by boxes from batch 0, class 1 etc. Out of
<cite>batch_size * num_class* num_boxes</cite> rows of indices,  only the first <cite>num_total_detection</cite>
rows are valid.</p>
<p>If <cite>output_format</cite> is “tensorflow”, the output is a relay.Tuple of three tensors, the first
is <cite>indices</cite> of size <cite>(batch_size, num_class * num_boxes , 2)</cite>, the second is <cite>scores</cite> of
size <cite>(batch_size, num_class * num_boxes)</cite>, and the third is <cite>num_total_detection</cite> of size
<cite>(batch_size,)</cite> representing the total number of selected boxes per batch. The two values
in <cite>indices</cite> encode class and box indices. Of num_class * num_boxes boxes in <cite>indices</cite> at
batch b, only the first <cite>num_total_detection[b]</cite> entries are valid. The second axis of
<cite>indices</cite> and <cite>scores</cite> are sorted within each class by box scores, but not across classes.
So the box indices and scores for the class 0 come first in a sorted order, followed by
the class 1 etc.</p>
</p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>relay.Tuple</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.get_valid_counts">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">get_valid_counts</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">score_threshold</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">id_index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">score_index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.get_valid_counts" title="永久链接至目标">¶</a></dt>
<dd><p>Get valid count of bounding boxes given a score threshold.
Also moves valid boxes to the top of input data.</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<em>relay.Expr</em>) – Input data. 3-D tensor with shape [batch_size, num_anchors, 6].</p></li>
<li><p><strong>score_threshold</strong> (<em>optional</em><em>, </em><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.10)"><em>float</em></a>) – Lower limit of score for valid bounding boxes.</p></li>
<li><p><strong>id_index</strong> (<em>optional</em><em>, </em><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – index of the class categories, -1 to disable.</p></li>
<li><p><strong>score_index</strong> (<em>optional</em><em>, </em><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – Index of the scores/confidence of boxes.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><strong>valid_count</strong> (<em>relay.Expr</em>) – 1-D tensor for valid number of boxes.</p></li>
<li><p><strong>out_tensor</strong> (<em>relay.Expr</em>) – Rearranged data tensor.</p></li>
<li><p><strong>out_indices</strong> (<em>relay.Expr</em>) – Indices in input data</p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.multibox_prior">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">multibox_prior</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sizes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(1.0,)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ratios</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(1.0,)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">steps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(-</span> <span class="pre">1.0,</span> <span class="pre">-</span> <span class="pre">1.0)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offsets</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0.5,</span> <span class="pre">0.5)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">clip</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.multibox_prior" title="永久链接至目标">¶</a></dt>
<dd><p>在 data 中，根据 sizes 和 ratios 生成先验框（锚框）。</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<em>relay.Expr</em>) – The input data tensor.</p></li>
<li><p><strong>sizes</strong> (<em>tuple of float</em><em>, </em><em>optional</em>) – Tuple of sizes for anchor boxes.</p></li>
<li><p><strong>ratios</strong> (<em>tuple of float</em><em>, </em><em>optional</em>) – Tuple of ratios for anchor boxes.</p></li>
<li><p><strong>steps</strong> (<em>Tuple of float</em><em>, </em><em>optional</em>) – Priorbox step across y and x, -1 for auto calculation.</p></li>
<li><p><strong>offsets</strong> (<em>tuple of int</em><em>, </em><em>optional</em>) – Priorbox center offsets, y and x respectively.</p></li>
<li><p><strong>clip</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Whether to clip out-of-boundary boxes.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><strong>out</strong> – 3-D tensor with shape [1, h_in * w_in * (num_sizes + num_ratios - 1), 4]</p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>relay.Expr</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.multibox_transform_loc">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">multibox_transform_loc</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cls_prob</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loc_pred</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">anchor</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">clip</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.01</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variances</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0.1,</span> <span class="pre">0.1,</span> <span class="pre">0.2,</span> <span class="pre">0.2)</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.multibox_transform_loc" title="永久链接至目标">¶</a></dt>
<dd><p>Location transformation for multibox detection</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cls_prob</strong> (<em>tvm.relay.Expr</em>) – Class probabilities.</p></li>
<li><p><strong>loc_pred</strong> (<em>tvm.relay.Expr</em>) – Location regression predictions.</p></li>
<li><p><strong>anchor</strong> (<em>tvm.relay.Expr</em>) – Prior anchor boxes.</p></li>
<li><p><strong>clip</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Whether to clip out-of-boundary boxes.</p></li>
<li><p><strong>threshold</strong> (<em>double</em><em>, </em><em>optional</em>) – Threshold to be a positive prediction.</p></li>
<li><p><strong>variances</strong> (<em>Tuple of float</em><em>, </em><em>optional</em>) – variances to be decoded from box regression output.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><strong>ret</strong></p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>tuple of tvm.relay.Expr</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.non_max_suppression">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">non_max_suppression</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valid_count</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">indices</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_output_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">iou_threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_suppress</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">top_k</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coord_start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">score_index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">id_index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_indices</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">invalid_to_bottom</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.non_max_suppression" title="永久链接至目标">¶</a></dt>
<dd><p>Non-maximum suppression operator for object detection.</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<em>relay.Expr</em>) – 3-D tensor with shape [batch_size, num_anchors, 6]
or [batch_size, num_anchors, 5].
The last dimension should be in format of
[class_id, score, box_left, box_top, box_right, box_bottom]
or [score, box_left, box_top, box_right, box_bottom]. It could
be the second output out_tensor of get_valid_counts.</p></li>
<li><p><strong>valid_count</strong> (<em>relay.Expr</em>) – 1-D tensor for valid number of boxes. It could be the output
valid_count of get_valid_counts.</p></li>
<li><p><strong>indices</strong> (<em>relay.Expr</em>) – 2-D tensor with shape [batch_size, num_anchors], represents
the index of box in original data. It could be the third
output out_indices of get_valid_counts. The values in the
second dimension are like the output of arange(num_anchors)
if get_valid_counts is not used before non_max_suppression.</p></li>
<li><p><strong>max_output_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a><em> or </em><em>relay.Expr</em><em>, </em><em>optional</em>) – Max number of output valid boxes for each instance.
Return all valid boxes if the value of max_output_size is less than 0.</p></li>
<li><p><strong>iou_threshold</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.10)"><em>float</em></a><em> or </em><em>relay.Expr</em><em>, </em><em>optional</em>) – Non-maximum suppression threshold.</p></li>
<li><p><strong>force_suppress</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(在 Python v3.10)"><em>bool</em></a><em>, </em><em>optional</em>) – Suppress all detections regardless of class_id.</p></li>
<li><p><strong>top_k</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a><em>, </em><em>optional</em>) – Keep maximum top k detections before nms, -1 for no limit.</p></li>
<li><p><strong>coord_start</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a><em>, </em><em>optional</em>) – The starting index of the consecutive 4 coordinates.</p></li>
<li><p><strong>score_index</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a><em>, </em><em>optional</em>) – Index of the scores/confidence of boxes.</p></li>
<li><p><strong>id_index</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a><em>, </em><em>optional</em>) – index of the class categories, -1 to disable.</p></li>
<li><p><strong>return_indices</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(在 Python v3.10)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to return box indices in input data.</p></li>
<li><p><strong>invalid_to_bottom</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(在 Python v3.10)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to move all valid bounding boxes to the top.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><strong>out</strong> – return relay.Expr if return_indices is disabled, a 3-D tensor
with shape [batch_size, num_anchors, 6] or [batch_size, num_anchors, 5].
If return_indices is True, return relay.Tuple of two 2-D tensors, with
shape [batch_size, num_anchors] and [batch_size, num_valid_anchors] respectively.</p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>relay.Expr or relay.Tuple</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.proposal">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">proposal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cls_prob</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bbox_pred</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">im_info</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scales</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ratios</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">feature_stride</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">threshold</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rpn_pre_nms_top_n</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rpn_post_nms_top_n</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rpn_min_size</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">iou_loss</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.proposal" title="永久链接至目标">¶</a></dt>
<dd><p>Proposal operator.</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cls_prob</strong> (<em>relay.Expr</em>) – 4-D tensor with shape [batch, 2 * num_anchors, height, width].</p></li>
<li><p><strong>bbox_pred</strong> (<em>relay.Expr</em>) – 4-D tensor with shape [batch, 4 * num_anchors, height, width].</p></li>
<li><p><strong>im_info</strong> (<em>relay.Expr</em>) – 2-D tensor with shape [batch, 3]. The last dimension should be in format of
[im_height, im_width, im_scale]</p></li>
<li><p><strong>scales</strong> (<em>list/tuple of float</em>) – Scales of anchor windows.</p></li>
<li><p><strong>ratios</strong> (<em>list/tuple of float</em>) – Ratios of anchor windows.</p></li>
<li><p><strong>feature_stride</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – The size of the receptive field each unit in the convolution layer of the rpn, for example
the product of all stride’s prior to this layer.</p></li>
<li><p><strong>threshold</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.10)"><em>float</em></a>) – Non-maximum suppression threshold.</p></li>
<li><p><strong>rpn_pre_nms_top_n</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – Number of top scoring boxes to apply NMS. -1 to use all boxes.</p></li>
<li><p><strong>rpn_post_nms_top_n</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – Number of top scoring boxes to keep after applying NMS to RPN proposals.</p></li>
<li><p><strong>rpn_min_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – Minimum height or width in proposal.</p></li>
<li><p><strong>iou_loss</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(在 Python v3.10)"><em>bool</em></a>) – Usage of IoU loss.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><strong>output</strong> – 2-D tensor with shape [batch * rpn_post_nms_top_n, 5]. The last dimension is in format of
[batch_index, w_start, h_start, w_end, h_end].</p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>relay.Expr</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.roi_align">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">roi_align</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rois</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pooled_size</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spatial_scale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sample_ratio</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">layout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'NCHW'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'avg'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.roi_align" title="永久链接至目标">¶</a></dt>
<dd><p>ROI align operator.</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<em>relay.Expr</em>) – 4-D tensor with shape [batch, channel, height, width]</p></li>
<li><p><strong>rois</strong> (<em>relay.Expr</em>) – 2-D tensor with shape [num_roi, 5]. The last dimension should be in format of
[batch_index, w_start, h_start, w_end, h_end]</p></li>
<li><p><strong>pooled_size</strong> (<em>list/tuple of two ints</em>) – output size</p></li>
<li><p><strong>spatial_scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.10)"><em>float</em></a>) – Ratio of input feature map height (or w) to raw image height (or w). Equals the reciprocal
of total stride in convolutional layers, which should be in range (0.0, 1.0]</p></li>
<li><p><strong>sample_ratio</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – Optional sampling ratio of ROI align, using adaptive size by default.</p></li>
<li><p><strong>mode</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(在 Python v3.10)"><em>str</em></a><em>, </em><em>Optional</em>) – The pooling method. Relay supports two methods, ‘avg’ and ‘max’. Default is ‘avg’.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><strong>output</strong> – 4-D tensor with shape [num_roi, channel, pooled_size, pooled_size]</p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>relay.Expr</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.roi_pool">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">roi_pool</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rois</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pooled_size</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spatial_scale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">layout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'NCHW'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.roi_pool" title="永久链接至目标">¶</a></dt>
<dd><p>ROI pool operator.</p>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<em>relay.Expr</em>) – 4-D tensor with shape [batch, channel, height, width]</p></li>
<li><p><strong>rois</strong> (<em>relay.Expr</em>) – 2-D tensor with shape [num_roi, 5]. The last dimension should be in format of
[batch_index, w_start, h_start, w_end, h_end]</p></li>
<li><p><strong>pooled_size</strong> (<em>list/tuple of two ints</em>) – output size</p></li>
<li><p><strong>spatial_scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.10)"><em>float</em></a>) – Ratio of input feature map height (or w) to raw image height (or w). Equals the reciprocal
of total stride in convolutional layers, which should be in range (0.0, 1.0]</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><strong>output</strong> – 4-D tensor with shape [num_roi, channel, pooled_size, pooled_size]</p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>relay.Expr</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="tvm.relay.vision.yolo_reorg">
<span class="sig-prename descclassname"><span class="pre">tvm.relay.vision.</span></span><span class="sig-name descname"><span class="pre">yolo_reorg</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stride</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tvm.relay.vision.yolo_reorg" title="永久链接至目标">¶</a></dt>
<dd><p>Yolo reorg operation used in darknet models.
This layer shuffles the input tensor values based on the stride value.
Along with the shuffling, it does the shape transform.
If ‘(n, c, h, w)’ is the data shape and ‘s’ is stride, output shape is ‘(n, c*s*s, h/s, w/s)’.</p>
<p>举例：</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">data</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[[[</span> <span class="mi">0</span>  <span class="mi">1</span><span class="p">]</span> <span class="p">[</span> <span class="mi">2</span>  <span class="mi">3</span><span class="p">]]</span>
                    <span class="p">[[</span> <span class="mi">4</span>  <span class="mi">5</span><span class="p">]</span> <span class="p">[</span> <span class="mi">6</span>  <span class="mi">7</span><span class="p">]]</span>
                    <span class="p">[[</span> <span class="mi">8</span>  <span class="mi">9</span><span class="p">]</span> <span class="p">[</span><span class="mi">10</span> <span class="mi">11</span><span class="p">]]</span>
                    <span class="p">[[</span><span class="mi">12</span> <span class="mi">13</span><span class="p">]</span> <span class="p">[</span><span class="mi">14</span> <span class="mi">15</span><span class="p">]]]]</span>
<span class="n">stride</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">ret</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="p">[[[[</span> <span class="mi">0</span><span class="p">]]</span>  <span class="p">[[</span> <span class="mi">2</span><span class="p">]]</span>  <span class="p">[[</span> <span class="mi">8</span><span class="p">]]</span>  <span class="p">[[</span><span class="mi">10</span><span class="p">]]</span>
                    <span class="p">[[</span> <span class="mi">1</span><span class="p">]]</span>  <span class="p">[[</span> <span class="mi">3</span><span class="p">]]</span>  <span class="p">[[</span> <span class="mi">9</span><span class="p">]]</span>  <span class="p">[[</span><span class="mi">11</span><span class="p">]]</span>
                    <span class="p">[[</span> <span class="mi">4</span><span class="p">]]</span>  <span class="p">[[</span> <span class="mi">6</span><span class="p">]]</span>  <span class="p">[[</span><span class="mi">12</span><span class="p">]]</span>  <span class="p">[[</span><span class="mi">14</span><span class="p">]]</span>
                    <span class="p">[[</span> <span class="mi">5</span><span class="p">]]</span>  <span class="p">[[</span> <span class="mi">7</span><span class="p">]]</span>  <span class="p">[[</span><span class="mi">13</span><span class="p">]]</span>  <span class="p">[[</span><span class="mi">15</span><span class="p">]]]]</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">注解</p>
<p>stride=1 has no significance for reorg operation.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">参数</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<em>relay.Expr</em>) – The input data tensor.</p></li>
<li><p><strong>stride</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.10)"><em>int</em></a>) – The stride value for reorganisation.</p></li>
</ul>
</dd>
<dt class="field-even">返回</dt>
<dd class="field-even"><p><strong>ret</strong> – The computed result.</p>
</dd>
<dt class="field-odd">返回类型</dt>
<dd class="field-odd"><p>relay.Expr</p>
</dd>
</dl>
</dd></dl>

</div>


           </div>
           
          </div>
          

<footer>

    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="image.html" class="btn btn-neutral float-right" title="tvm.relay.image" accesskey="n" rel="next">下一个 <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="nn.html" class="btn btn-neutral float-left" title="tvm.relay.nn" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> 上一个</a>
      
    </div>

<div id="button" class="backtop"><img src="../../../../_static//img/right.svg" alt="backtop"/> </div>
<section class="footerSec">
    <div class="footerHeader">
      <ul class="d-flex align-md-items-center justify-content-between flex-column flex-md-row">
        <li class="copywrite d-flex align-items-center">
          <h5 id="copy-right-info">© 2020 Apache Software Foundation | All right reserved</h5>
        </li>
      </ul>

    </div>

    <ul>
      <li class="footernote">Copyright © 2020 The Apache Software Foundation. Apache TVM, Apache, the Apache feather, and the Apache TVM project logo are either trademarks or registered trademarks of the Apache Software Foundation.</li>
    </ul>

</section>
</footer>
        </div>
      </div>

    </section>

  </div>
  

    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

  </body>
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
    <!-- Theme Analytics -->
    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-75982049-2', 'auto');
    ga('send', 'pageview');
    </script>

    
   

</body>
</html>